Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor internal packages #1116

Merged
merged 5 commits into from
Mar 2, 2022
Merged

Refactor internal packages #1116

merged 5 commits into from
Mar 2, 2022

Conversation

ersonp
Copy link
Contributor

@ersonp ersonp commented Mar 1, 2022

Did you run make format && make check?
yes

Fixes #

Changes:

  • Refactored httpauth package
  • Refactored testhelpers package
  • Removed reuseclient from httpauth
  • Renamed extractError
  • Removed noise from internal/vpn

How to test this PR:

  1. Run a visor ./skywire-visor -c config.json
  2. Check if everything is working

ersonp added 5 commits March 1, 2022 18:21
This commit refactors the internal package httpauth.

The auth file is renamed to nonce as Auth struct and its funcs are removed as they are no longer used.

Only Nonce and it's funcs remain hence the name of the file is changed to nonce.
This commit removes the funcs WithinTimeout() and NoErrorN() as they are no longer in use.
This commit removes the reuseClient field from the Client struct as well as the funcs that used it along with the func Header() as it was not used anymore.

The reuse client functionality is not used anymore hence it is being removed.
This commit renames the func extractError() to extractHTTPError() and adds a new global func ExtractError().

The func extractError() is removed from internal/utclient and pkg/addrresolver nad they instead use the func ExtractError() from internal/httpauth.
This commit removes the noise_credentials file along with the func WrapRWWithNoise() as it is not being used anymore.
Copy link
Member

@jdknives jdknives left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well.

@jdknives jdknives merged commit 41c3731 into skycoin:develop Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants